import axios from '@/libs/api.request'

export const createTestcaseResult = (testcaseResult) => {
  return axios.request({
    url: 'api/HttpAutoTestService/testcase_result/',
    data: testcaseResult,
    method: 'post'
  })
};

export const getTestcaseResults = (val) => {
  return axios.request({
    url: 'api/HttpAutoTestService/testcase_results/',
    params: val,
    method: 'get'
  })
};

export const getTestcaseResultById = (id) => {
  return axios.request({
    url: `api/HttpAutoTestService/testcase_results/${id}/`,
    method: 'get'
  })
};


export const batchDeleteTestcaseResult = (data) => {
  return axios.request({
    url: 'api/HttpAutoTestService/testcase_result/batch_delete/',
    method: 'delete',
    data: data
  })
};

export const getTestcaseResultVersions = () => {
  return axios.request({
    url: 'api/HttpAutoTestService/testcase_result/version/',
    method: 'get'
  })
}